package comparator;

import java.util.Comparator;

import data.DataMessage;

@SuppressWarnings("rawtypes")
public class DataMessageComparator implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
		DataMessage dataMessage1 = (DataMessage) o1;
		DataMessage dataMessage2 = (DataMessage) o2;
		return dataMessage1.getTime()<=dataMessage2.getTime()?-1:1;
	}

}
